#include "stdio.h"
#include "fcntl.h"
#include "errno.h"
#include "unistd.h"
#include "string.h"

int main(int argc, char const *argv[])
{
    int c;
   /* read(STDIN_FILENO, &c, 1);
    //printf("%c\n", c);
    write(STDOUT_FILENO, &c, 1);
    write(STDERR_FILENO, &c, 1);
    c = '\n';
    write(STDOUT_FILENO, &c, 1); */

    // 标准输入重定向
    close(STDIN_FILENO);
    open("test/app_buffer_test.c", O_RDONLY);
    read(STDIN_FILENO, &c, 1);
    printf("%c\n", c);
    return 0;
}
